package br.usp.ime.protoc.client;

import java.util.List;

import br.usp.ime.protoc.pessoa.Controle;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface ControleService extends RemoteService {

	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {

		private static ControleServiceAsync instance;

		public static ControleServiceAsync getInstance() {
			if (instance == null) {
				instance = (ControleServiceAsync) GWT
						.create(ControleService.class);
				ServiceDefTarget target = (ServiceDefTarget) instance;
				target.setServiceEntryPoint(GWT.getModuleBaseURL()
						+ "/ControleService");
			}
			return instance;
		}
	}

	/**
	 * Obtem Controles.
	 */
	public List<Controle> obterControles();
 
	/**
	 * Obter Controle.
	 */
	public Controle obterControle(int id);

	/**
	 * Incluir Controle.
	 */
	public Boolean incluirControle(Controle controle);

	/**
	 * Alterar Controle.
	 */
	public Boolean alterarControle(Controle controle);

	/**
	 * Excluir Controle.
	 */
	public Boolean excluirControle(int id);

}
